package com.linkq.ipinyin.controller;

import com.linkq.ipinyin.model.ExecutionPlan;
import com.linkq.ipinyin.service.ExecutionPlanService;
import com.linkq.ipinyin.vo.ResultInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @FileName ExecutePlanController
 * @Description
 * @Author wangpeng
 * @date 2025-01-12
 **/

@RestController
@RequestMapping("executePlan")
public class ExecutePlanController {
    @Autowired
    private ExecutionPlanService executionPlanService;

    @PostMapping("getExecutePlan")
    public ResultInfo getExecutePlan(@RequestBody ExecutionPlan executionPlan) {
        return executionPlanService.getExecutePlan(executionPlan);
    }

    @PostMapping("startExecutePlan")
    public ResultInfo startExecutePlan(@RequestBody ExecutionPlan executionPlan) {
        return executionPlanService.startExecutePlan(executionPlan);
    }
}
